package com.sinosoft.ebusiness.domain.elementManage;
// 采用工具 Hibernate Tools 3.2.4.GA (sinosoft version) 生成，请勿手工修改。

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * POJO类GeProductRiskId
 */
@Embeddable
public class GeProductRiskId implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6317626215456505637L;

	/** 属性productcode */
	private String productcode;

	/** 属性险种代码 */
	private String riskCode;

	/** 属性版本号 */
	private String version;

	/**
	 * 类GeProductRiskId的默认构造方法
	 */
	public GeProductRiskId() {
	}

	/**
	 * 属性productcode的getter方法
	 */

	@Column(name = "PRODUCTCODE")
	public String getProductcode() {
		return this.productcode;
	}

	/**
	 * 属性productcode的setter方法
	 */
	public void setProductcode(String productcode) {
		this.productcode = productcode;
	}

	/**
	 * 属性险种代码的getter方法
	 */

	@Column(name = "RISKCODE")
	public String getRiskCode() {
		return this.riskCode;
	}

	/**
	 * 属性险种代码的setter方法
	 */
	public void setRiskCode(String riskCode) {
		this.riskCode = riskCode;
	}

	/**
	 * 属性版本号的getter方法
	 */

	@Column(name = "VERSION")
	public String getVersion() {
		return this.version;
	}

	/**
	 * 属性版本号的setter方法
	 */
	public void setVersion(String version) {
		this.version = version;
	}

	public boolean equals(Object other) {
		if ((this == other)) {
			return true;
		}
		if ((other == null)) {
			return false;
		}
		if (!(other instanceof GeProductRiskId)) {
			return false;
		}
		GeProductRiskId castOther = (GeProductRiskId) other;

		return ((this.getProductcode() == castOther.getProductcode()) || (this
				.getProductcode() != null && castOther.getProductcode() != null && this
				.getProductcode().equals(castOther.getProductcode())))
				&& ((this.getRiskCode() == castOther.getRiskCode()) || (this
						.getRiskCode() != null
						&& castOther.getRiskCode() != null && this
						.getRiskCode().equals(castOther.getRiskCode())))
				&& ((this.getVersion() == castOther.getVersion()) || (this
						.getVersion() != null && castOther.getVersion() != null && this
						.getVersion().equals(castOther.getVersion())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getProductcode() == null ? 0 : this.getProductcode()
						.hashCode());
		result = 37 * result
				+ (getRiskCode() == null ? 0 : this.getRiskCode().hashCode());
		result = 37 * result
				+ (getVersion() == null ? 0 : this.getVersion().hashCode());
		return result;
	}

}
